<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<html>
<head>
<title>
 Overview
</title>
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script>
function asd() {
	
		parent.document.title="app-assistant.js Overview";
	
}
</script>
</head>
<body bgcolor="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> 	<font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top">
<em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<center>
	
	   <h2>app-assistant.js</h2>
	
</center>

	


<h4>Summary</h4>
<p>
	
		No overview generated for 'app-assistant.js'<BR/><BR/>
	
</p>

<hr>


    <table border="1" cellpadding="3" cellspacing="0" width="100%">
    <tr bgcolor="#CCCCFF" class="TableHeadingColor">
    <td colspan=2><font size="+2">
    
        <b>Class Summary</b>
    
    </font></td>
    </tr>
    
    <tr bgcolor="white" class="TableRowColor">
    <td width="15%"><b><a href="AppAssistant.html">AppAssistant</a></b></td>
    <td>&nbsp;</td>
    </tr>
    
    </table>
    <hr/> 


<!-- ========== METHOD SUMMARY =========== -->

<!-- ========== END METHOD SUMMARY =========== -->


        <pre class="sourceview"><span class="reserved">function</span> AppAssistant() {
}

<span class="comment">/** The handleLaunch function of the AppAssistant is called when the application is first launched.
 * Based on launchParams.source, the application can determine whether to launch the card view
 * and login page, or whether to go directly to a specific view if the application was launched
 * via a specific alarm call instead of through the launcher panel.
 * <span class="attrib">@param</span> {JSON Object} launchParams
 */</span>
AppAssistant.<span class="reserved">prototype</span>.handleLaunch = <span class="reserved">function</span>(launchParams) {
	<span class="comment">/** If the application is launched from anything but the "sat_alarm_call" (such as through the
	 * application's icon in the launcher, handleLaunch will create the main stage, and then push the
	 * login card onto the stage stack.
	 */</span>
	<span class="reserved">if</span> (launchParams.source != <span class="literal">"sat_alarm_call"</span>) {
		var mainStageArgs = {name: <span class="literal">'mainStage'</span>, lightweight: false};
		var stageProxy = <span class="reserved">this</span>.controller.getStageProxy(<span class="literal">'mainStage'</span>);
		var stageController = <span class="reserved">this</span>.controller.getStageController(<span class="literal">'mainStage'</span>);
		<span class="reserved">if</span> (stageProxy) {
			<span class="reserved">if</span> (stageController) {
				stageController.window.focus();
			}
		} <span class="reserved">else</span> {
			var pushLogin = <span class="reserved">function</span>(stageController) {
				stageController.pushScene(<span class="literal">'login'</span>);
			};
			<span class="reserved">this</span>.controller.createStageWithCallback(mainStageArgs, pushLogin, <span class="literal">"card"</span>);
		}
	<span class="comment">/** If the application is launched from the "sat_alarm_call", meaning the a satellite is currently
	 * passing overhead, the main stage is created, but the satellite scene is pushed immediately,
	 * instead of starting off at the login screen.
	 */</span>
	} <span class="reserved">else</span> <span class="reserved">if</span> (launchParams.source == <span class="literal">"sat_alarm_call"</span>) {
		var mainStageArgs = {name: <span class="literal">'mainStage'</span>, lightweight: false};
		var stageProxy = <span class="reserved">this</span>.controller.getStageProxy(<span class="literal">'mainStage'</span>);
		var stageController = <span class="reserved">this</span>.controller.getStageController(<span class="literal">'mainStage'</span>);
		<span class="reserved">if</span> (stageProxy) {
			<span class="reserved">if</span> (stageController) {
				stageController.window.focus();
				Mojo.Controller.getAppController().showBanner(<span class="literal">"Satellite alarm called."</span>,
   					{source: <span class="literal">'sat_alarm_banner'</span>});
			}
		} <span class="reserved">else</span> {
			var pushSatellite = <span class="reserved">function</span>(stageController) {
				stageController.pushScene(<span class="literal">'satellite'</span>);
			};
			<span class="reserved">this</span>.controller.createStageWithCallback(mainStageArgs, pushSatellite, <span class="literal">"card"</span>);
		}
	}
}</pre>
	<hr>



<!-- ========== START OF NAVBAR ========== -->
<a name="navbar_top"><!-- --></a>
<table border="0" width="100%" cellpadding="1" cellspacing="0">
<tr>
<td colspan=2 bgcolor="#EEEEFF" class="NavBarCell1">
<a name="navbar_top_firstrow"><!-- --></a>
<table border="0" cellpadding="0" cellspacing="3">
  <tr align="center" valign="top">
  
  
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-summary.html"><font class="NavBarFont1"><b>Overview</b></font></a>&nbsp;</td>
  <td bgcolor="#FFFFFF" class="NavBarCell1Rev">	&nbsp;<font class="NavBarFont1Rev"><b>File</b></font>&nbsp;</td>
  

  <td bgcolor="#FFFFFF" class="NavBarCell1"> <font class="NavBarFont1">Class</font>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="overview-tree.html"><font class="NavBarFont1"><b>Tree</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="index-all.html"--><font class="NavBarFont1"><b>Index</b></font></a>&nbsp;</td>
  <td bgcolor="#EEEEFF" class="NavBarCell1">    <a href="help-doc.html"><font class="NavBarFont1"><b>Help</b></font></a>&nbsp;</td>
  </tr>
</table>
</td>
<td bgcolor="#EEEEFF" align="right" valign="top"><em>
<b></b></em>
</td>
</tr>

<tr>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
&nbsp;PREV&nbsp;
&nbsp;NEXT</font></td>
<td bgcolor="white" class="NavBarCell2"><font size="-2">
  <a href="index.html" target="_top"><b>FRAMES</b></a>  &nbsp;
&nbsp;<a href="overview-summary.html" target="_top"><b>NO FRAMES</b></a>
&nbsp;&nbsp;
<script>
  <!--
  if(window==top) {
    document.writeln('<A HREF="allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
  }
  //-->
</script>
<noscript>
<a href="allclasses-noframe.html" target=""><b>All Classes</b></a>
</noscript>
</font></td>
</tr>
</table>
<!-- =========== END OF NAVBAR =========== -->

<hr>
<font size="-1">

</font>
<div class="jsdoc_ctime">Documentation generated by <a href="http://jsdoc.sourceforge.net/" target="_parent">JSDoc</a> on Thu May  6 17:21:45 2010</div>
</body>
</html>
